home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 2 / Atari Mega Archive CD - Volume 2.iso / minix / up1510b.tgz / up1510b / include / utmp.h < prev   
C/C++ Source or Header  |  1990-07-23  |  1KB  |  32 lines

  1. /* The <utmp.h> header is used by init, login, who, etc. */
  2.  
  3. #ifndef _UTMP_H
  4. #define _UTMP_H
  5.  
  6. #define WTMP  "/usr/adm/wtmp"    /* the login history file */
  7. #define BTMP  "/usr/adm/btmp"    /* the bad-login history file */
  8. #define UTMP  "/etc/utmp"    /* the user accouting file */
  9.  
  10.  
  11. struct utmp {
  12.   char ut_user[8];        /* user name */
  13.   char ut_id[4];        /* /etc/inittab ID */
  14.   char ut_line[12];        /* terminal name */
  15.   pid_t ut_pid;            /* process id */
  16.   short int ut_type;        /* type of entry */
  17.   long ut_time;            /* login/logout time */
  18. };
  19.  
  20. #define ut_name ut_user        /* for compatibility with other systems */
  21.  
  22.  
  23. /* Definitions for ut_type. */
  24. #define RUN_LVL            1    /* this is a RUN_LEVEL record */
  25. #define BOOT_TIME          2    /* this is a REBOOT record */
  26. #define INIT_PROCESS       5    /* this process was spawned by INIT */
  27. #define LOGIN_PROCESS      6    /* this is a 'getty' process waiting */
  28. #define USER_PROCESS       7    /* any other user process */
  29. #define DEAD_PROCESS       8    /* this process has died (wtmp only) */
  30.  
  31. #endif /* _UTMP_H */
  32.